package com.fpd.enums;

/**
 * 函件类别
 *
 * @author Monster
 */
public enum LetterTypeEnum {
	NORMAL("1", "普通件"),
	SECRETE("2", "保密件");

    private String value;
    private String name;

    LetterTypeEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getNameByValue(String value) {
        for (LetterTypeEnum ate : LetterTypeEnum.values()) {
            if (ate.getValue().equals(value)) {
                return ate.getName();
            }
        }
        return "";
    }
}
